package com.demo.salary.abstracttransactions;

import com.demo.salary.payrolldomain.Employee;
import com.demo.salary.payrolldomain.PaymentClassification;
import com.demo.salary.payrolldomain.PaymentSchedule;

public abstract class ChangeClassificationTransaction extends ChangeEmployeeTransaction {

    public ChangeClassificationTransaction(int empId) {
        super(empId);
    }

    public abstract PaymentSchedule getSchedule();

    public  abstract PaymentClassification getClassification();

    @Override
    public void change(Employee employee) {
        PaymentSchedule schedule = getSchedule();
        PaymentClassification classification = getClassification();
        employee.setSchedule(schedule);
        employee.setClassification(classification);
    }
}
